<?php
/**
 * Created by JetBrains PhpStorm.
 * User: xami
 * Date: 12-9-25
 * Time: 下午9:28
 * To change this template use File | Settings | File Templates.
 */

$session=new CHttpSession();
$session->open();
$i=$session['i'];

$iid=Yii::app()->request->getParam('iid', 0);
$cate=Yii::app()->request->getParam('cate', 0);

?>

<tr<?php echo $i%2==1 ? '': ' class="tr1"'; ?>>
    <td align="center" class="td1<?php echo $i%2==1 ? '': ' td2"'; ?>"><a target="_blank" href="<?php
    if($data->grade==0){
        echo $this->createUrl('cate/list',array('pid'=>3, 'cid'=>19, 'aid'=>$data->aid));
    }elseif($data->grade==1){
        echo $data->excerpt;
    }
    ?>"><?php echo $data->title;?></a></td>
    <td align="center"<?php echo $i%2==1 ? '': ' class="td2"'; ?>><?php echo $data->createtime;?></td>
    <td align="center"<?php echo $i%2==1 ? '': ' class="td2"'; ?>>
        <a href="<?php echo $this->createUrl('manage/index', array('cate'=>$cate, 'iid'=>$iid, 'id'=>$data->aid));?>">编辑</a>
        <!--        |-->
        <!--        <a href="/index.php?r=manage/index&cate=--><?php //echo (isset($session['cid'])&&$session['cid']>0)  ? $session['cid'] : 12;?><!--&id=--><?php //echo $data->aid;?><!--">编辑</a>-->
        |
        <a href="<?php echo $this->createUrl('manage/index', array('cate'=>$cate, 'iid'=>$iid, 'do'=>'delete', 'id'=>$data->aid));?>">删除</a>
    </td>
</tr>

<?php
$session['i']=$i+1;